home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
dev
/
e
/
amigae33a.lha
/
E_v3.3a
/
Src.lha
/
Src
/
Pd
/
setf
/
setf.readme
< prev
Wrap
Text File
|
1995-02-02
|
1KB
|
19 lines
Short: Running E code from other processes
Type: dev/e
Uploader: m88jrh@uk.ac.ox.ecs (Jason R. Hulance)
Author: m88jrh@uk.ac.ox.ecs (Jason R. Hulance)
This archive contains a few E sources which use SetFunction() to patch some
library calls. They serve to show how to run E code from other processes.
The important point is that E uses the A4 register for its global variables
so this must be preserved. The examples show a running E program setting up
a storage place for a copy of A4, and then code from this program can be run
from another process (after first restoring A4). The "other process" is the
examples is the process which calls the patched system function.
Code which does not use global variables is easier to deal with, since this
does not require restoration of A4. However, a lot of code implicitly uses
global variables, since things like library calls use the global library
base variables. Also, E built-in functions use a number of globals, e.g.,
WriteF uses "stdout" and "conout".